<?php

namespace App\model;

use Illuminate\Database\Eloquent\Model;

/**
 * App\model\UserWorkshopApply
 *
 * @property int $id
 * @property int|null $user_id
 * @property int|null $workshop_id
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\UserWorkshopApply newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\UserWorkshopApply newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\UserWorkshopApply query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\UserWorkshopApply whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\UserWorkshopApply whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\UserWorkshopApply whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\UserWorkshopApply whereUserId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\UserWorkshopApply whereWorkshopId($value)
 * @mixin \Eloquent
 * @property int|null $status
 * @method static \Illuminate\Database\Eloquent\Builder|\App\model\UserWorkshopApply whereStatus($value)
 */
class UserWorkshopApply extends Model
{
    protected $table="user_workshop_apply";
    public static function boot()
    {
        parent::boot();
        static::addGlobalScope('status', function ( $builder) {
            $builder->where('status', '=', 0);
        });

    }
}
